import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class LoginDto {
  @ApiProperty({ description: '用户名标题' })
  @IsNotEmpty({ message: '用户名标题必填' })
  @IsString({ message: '用户名标题必须为字符串类型' })
  readonly username: string;

  @ApiProperty({ description: '密码标题' })
  @IsNotEmpty({ message: '密码标题必填' })
  @IsString({ message: '密码标题必须为字符串类型' })
  readonly password: string;
}
